<?php
include("include/conn.php");
require('include/Smarty/libs/Smarty.class.php');
if(!isset($_SESSION['s_activId'.$cfgPack]))
{
  $_SESSION['s_urlRedirectDir'] = $_SERVER['REQUEST_URI'];
  header("Location:checkLogin.php");
}
else
{	
	$q = strtolower($_GET["q"]);
	if (!$q) return;
	
	$sql = "select DISTINCT text1 from garnuother where text1 REGEXP '^$q'";
	$rsd = mysql_query($sql);
	while($rs = mysql_fetch_array($rsd)) 
	{
		$cname = $rs['text1'];
		echo "$cname\n";
	}
}
require('bottom.php');
?>